<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xhtml xsl">
	<xsl:output method="html" media-type="text/xhtml" omit-xml-declaration="yes" 
	version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
	
	<xsl:include href="headData.xsl" />

	<xsl:template match="content">
			<div id="content">
			<xsl:apply-templates select="titleContent"/>
			<xsl:for-each select="node()[name() != 'titleContent']">
				<xsl:copy-of select="." />
			</xsl:for-each>
			<span id="endContent"></span>
			</div>
	</xsl:template>
	
	<xsl:template match="titleContent">
		<xsl:choose>
			<xsl:when test="@lang">
				<h1 xml:lang="{lang}" lang="{lang}"><xsl:value-of select="."/></h1>
			</xsl:when>
			<xsl:otherwise>
					<h1><xsl:value-of select="."/></h1>
			</xsl:otherwise>
		</xsl:choose>		
	</xsl:template>
	
</xsl:stylesheet>
